<ul>
	<?php foreach ($posts as $post) { ?>
		<li>
			<span class="date"><?= time_to_str($post->created_at) ?></span>
			<span class="text"><?= anchor('news/show/'.$post->id.'/'.$page, $post->title) ?></span>
		</li>
	<?php } ?>
</ul>
<?php if ($nb_pages > 1) { ?>
	<table class="news-navigation">
		<tr>
			<td>
				<?php if ($page < $nb_pages) { ?>
				<a href="javascript:news_load_titles(<?= $page + 1 ?>, 'left')" class="previous">Plus ancien</a>
				<?php } ?>
			</td>
			<td>Page <?= $page ?> / <?= $nb_pages ?></td>
			<td>
				<?php if ($page > 1) { ?>
				<a href="javascript:news_load_titles(<?= $page - 1 ?>, 'right')" class="next">Plus récent</a>
				<?php } ?>
			</td>
		</tr>
	</table>
<?php } ?>
